<?php

class IndexController extends Controller
{
	
	public $layout='//layouts/main';
	
	public function actionIndex()
	{
		$this->render('index');
	}
	
	public function getBottomContents()
	{
		return new CActiveDataProvider('Content', array(
			'criteria'=>array(
				'condition'=>'show_index = 1'
			),
			'pagination'=>array(
				'pageSize'=>100
			)
		));
	}
	
	public function getIndexNews()
	{
		return new CActiveDataProvider('News', array(
			'criteria'=>array(
				'condition'=>'show_index = 1'
			),
			'pagination'=>array(
				'pageSize'=>10
			)
		));
	}
}